Skip to content

Conversation

gainlinejono
Copy link
Contributor

@gainlinejono gainlinejono commented Jul 18, 2025

The Laravel Starter Kit’s components.json schema has been updated to replace the unrecognised typescript key with tsx, aligning with shadcn UI’s expected configuration.

https://ui.shadcn.com/docs/components-json#tsx

Furthermore, this key/value pair does not exist in the shadcn/vue fork.

Currently when attempting to configure extensions for shadcn/ui shadcn/vue if this line exists it breaks CLI functionality.

An example of this can be found by attempting to apply themes to a fresh Laravel Install using Intertia/Vue Starter Kit and and using the TweakCN tool found here: https://tweakcn.com/

Running the theme install command: pnpm dlx shadcn@latest add https://tweakcn.com/r/themes/mono.json

Results in the following error, caused by the typescript line being as is

✔ You are about to install a new style. 
Existing CSS variables and components will be overwritten. Continue? … yes

Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

Invalid configuration found in components.json

This fix ensures that third‑party shadcn plugins and the shadcn CLI
correctly detect and generate TSX components.

The Laravel Starter Kit’s components.json schema has been updated to
replace the unrecognized `typescript` key with `tsx`, aligning with
shadcn UI’s expected configuration.
@taylorotwell taylorotwell merged commit 580dbd1 into laravel:main Jul 24, 2025
2 checks passed
@patrickdundas
Copy link

patrickdundas commented Jul 29, 2025

Hey @gainlinejono & @taylorotwell - this PR caused my shadcn cli commands to fail:

$ npx shadcn-vue@latest add select

Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.
                                                                 
Invalid configuration found in components.json.   

The components.json file generated by the Laravel Vue starter kit specified a schema of https://shadcn-vue.com/schema.json, which contains the typescript key instead of tsx. Changing this back to typescript allowed me to rerun successfully.

I believe the issue here was that you confused the link you provided in your PR (https://ui.shadcn.com/schema.json) with the link we are using in composer.json:

"$schema": "https://shadcn-vue.com/schema.json",

The shadcn-vue schema uses the typescript key instead of tsx

This should either be reverted, or the URL should be updated (provided that doesn't break/change anything else?)

@gainlinejono
Copy link
Contributor Author

Perhaps the line should just be removed. It has no use as by default it's value is true, and if you set typescript to false it breaks as well with the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants